package com.lantosec.hmrp.modules.workflow.service;

import com.lantosec.hmrp.core.kit.Result;
import com.lantosec.hmrp.modules.workflow.vo.ModelVO;
import com.lantosec.hmrp.modules.workflow.vo.SaveDeployVO;
import org.flowable.bpmn.model.ExtensionAttribute;
import org.flowable.bpmn.model.FlowElement;
import org.flowable.engine.repository.Deployment;

import java.util.List;

/**
 * 部署流程服务接口
 *
 * @author lichaowei
 * @date 2020/4/24
 */
public interface IWorkflowDeployService{

    /**
     * 部署
     * @param deployVO
     * @return
     */
    Result<Void> deployment(SaveDeployVO deployVO);

    /**
     * 部署
     * @param modelId   流程模型ID
     * @return
     */
    Deployment deploymentFromModelId(String modelId);

    /**
     * 查询流程部署信息
     * @param deploymentId   流程部署ID
     * @return
     */
    ModelVO getDeploymentInfo(String deploymentId);

    /**
     * 保存流程部署信息
     * @param modelVO   流程信息
     * @return
     */
    void saveDeploymentInfo(ModelVO modelVO);

    /**
     * 删除流程部署缓存
     * @param processDefinitionId 流程定义Id
     * @return
     */
    Boolean deleteCache(String processDefinitionId);
}
